#!/bin/sh

latex paper.tex
[ $? -eq 1 ] && exit

latex paper.tex 
dvipdf paper.dvi paper.pdf
dvips paper.dvi

which evince
[$? -eq 1 ] && exit

evince paper.pdf &
